package com.bl.student.dao.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Created by yujingyi on 2018/5/5.
 */
@Entity
@Data
@Table(name = "nobook_city")
@ApiModel(value = "CityEntity", description = "城市")
@DynamicInsert
@DynamicUpdate
public class CityEntity {
    @Id
    @ApiModelProperty(value = "id")
    private int id;

    @ApiModelProperty(value = "父城市ID")
    private int parentid;

    @ApiModelProperty(value = "名字")
    private String name;

    @ApiModelProperty(value = "城市级别")
    private int level;

    @ApiModelProperty(value = "城市首字母")
    private String first;

    @ApiModelProperty(value = "是否是直辖市(1 是)")
    private int ismunicipality;

    @ApiModelProperty(value = "是否有学校(1 有)")
    private int hasschool;
}
